import { requestClient } from '#/api/request';

/**
 * 文件上传
 * @param data
 */
export async function uploadFile(data: any) {
  return requestClient.upload('/sys/fileInfo/upload', data);
}
/**
 * 通过文件id集合获取文件信息
 * @param data
 */
export async function getFileInfoByIds(data: any) {
  return requestClient.post('/sys/fileInfo/getFileInfoByIds', data);
}
/**
 * 初始化切片
 * /sys/fileInfo/initiateMultipartUpload
 */

export async function initiateMultipartUpload(data: any) {
  return requestClient.post('/sys/fileInfo/initiateMultipartUpload', data);
}

/**
 * 上传切片
 * /sys/fileInfo/uploadPart
 */
export async function uploadPart(data: any) {
  return requestClient.upload('/sys/fileInfo/uploadPart', data);
}
/**
 * 已完成分片上传-告知合并
 * /sys/fileInfo/completeMultipartUpload
 */
export async function completeMultipartUpload(data: any) {
  return requestClient.post('/sys/fileInfo/completeMultipartUpload', data);
}
/**
 * 取消分片上传
 * /sys/fileInfo/abortMultipartUpload
 */
export async function abortMultipartUpload(data: any) {
  return requestClient.post('/sys/fileInfo/abortMultipartUpload', data);
}
